﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "IFamily2DSketchCurve.h"

namespace gfam
{
    /// \brief 草图圆弧的接口类
    class GM_FAMILY_SERVICE_EXPORT IFamily2DSketchArc : public gfam::IFamily2DSketchCurve
    {
        DEFINE_CAST_DERIVED(gfam::IFamily2DSketchArc, gfam::IFamily2DSketchCurve)
    public:


        /// \brief 创建草图圆弧
        ///
        /// \param pDocument 文档类
        /// \param sketchId 草图
        /// \param sketchPlaneId 草图平面
        /// \param startPoint 起点坐标
        /// \param endPoint 终点坐标
        /// \param refPoint 参考点
        /// \return 返回创建的草图圆弧
        static IFamily2DSketchArc* Create(
            gcmp::IDocument* pDocument
            , const gcmp::ElementId& sketchId
            , const gcmp::ElementId& sketchPlaneId
            , const gcmp::Vector3d& startPoint
            , const gcmp::Vector3d& endPoint
            , const gcmp::Vector3d& refPoint);


        /// \brief 创建草图圆弧
        ///
        /// \param pDocument 文档类
        /// \param sketchId 草图
        /// \param sketchPlaneId 草图平面
        /// \param centerPoint 圆心
        /// \param xDir x轴方向
        /// \param yDir y轴方向
        /// \param radius y轴方向
        /// \param startAngle 起始弧度
        /// \param endAngle 终止弧度
        /// \param antiClockwise 弧顺逆方向，true：逆时， false：顺时
        /// \return 返回创建的草图圆弧
        static IFamily2DSketchArc* Create(
            gcmp::IDocument* pDoc
            , const gcmp::ElementId& sketchId
            , const gcmp::ElementId& sketchPlaneId
            , const gcmp::Vector3d& centerPoint
            , const gcmp::Vector3d& xDir
            , const gcmp::Vector3d& yDir
            , double radius
            , double startAngle
            , double endAngle
            , bool antiClockwise);


        static IFamily2DSketchArc* Create(
            gcmp::IDocument* pDoc
            , const gcmp::ElementId& sketchId
            , const gcmp::ElementId& sketchPlaneId
            , const gcmp::Vector3d& centerPoint
            , const gcmp::Vector3d& startPoint
            , const gcmp::Vector3d& endPoint
            , int clockSign);


        /// \brief 获取圆心可见的关联更新id
        ///
        /// \return 关联更新id
        virtual RegenDataId GetCenterVisibleRdId() const = 0;

        /// \brief 设置圆心是否可见
        ///
        /// \param  visible 圆心是否可见
        /// \return 关联更新id
        virtual void SetArcCenterVisible(bool visible) = 0;

        /// \brief 获取圆心是否可见
        ///
        /// \param  visible 圆心是否可见
        /// \return  圆心是否可见
        virtual bool GetArcCenterVisible() const = 0;

        /// \brief 获取圆心
        ///
        /// \return  圆心
        virtual gcmp::Vector3d GetCenter( ) const = 0;

        /// \brief 获取半径
        ///
        /// \return 半径
        virtual double GetRadius()const = 0;

        /// \brief 获取起始弧度
        ///
        /// \return 起始弧度
        virtual double GetStartAngle() const = 0;

        /// \brief 获取终止弧度
        ///
        /// \return 终止弧度
        virtual double GetEndAngle() const = 0;

    };
}